<?php
/* This is where you would inject your sql into the database 
   but we're just going to format it and send it back
*/



foreach ($_GET['listItem'] as $position => $item) :    
	//$sql[] = "UPDATE `TagMenu` SET `tmINDEX` = $position WHERE `menuID` = $item";
        $xql = "UPDATE TagMenu SET tmINDEX = " . $position . " WHERE `tmID` =" . $item;
        //echo $xql;
        include '../../readcookie.php';
        include '../../db.php';

        mysql_query($xql);
endforeach;

//echo $sql;



//print_r ($sql);
?>